home *** CD-ROM | disk | FTP | other *** search
/ Hot Metal Pro 4.0 / Hot Metal Pro 4.0.iso / Special / text / dtc.txt < prev    next >
Encoding:
Text File  |  1997-11-17  |  14.4 KB  |  414 lines

  1.  
  2. 4. Design-Time Controls
  3.  
  4.  
  5.  
  6. A Design-Time Control is an ActiveX control that lets
  7. you configure the content of your page, or an object
  8. of some type that is embedded in the page.
  9.  
  10. NOTE: While the DTCs that are discussed in this chapter
  11. are used for configuring HTML, applets, and scripts
  12. in Web pages, DTCs can also be created for more general
  13. purposes. There may be other DTCs registered on your
  14. system which come from other companies and are used
  15. for purposes besides editing Web pages.
  16.  
  17. When you insert a DTC with the HoTMetaL PRO Editor,
  18. two things are inserted in your page:
  19.  
  20. 1. The object or markup that the DTC configures.
  21.  
  22. 2. The some code referring DTC itself, so that you can
  23. open it at a later time to reconfigure the object that
  24. was inserted. (This code is only displayed in HTML source
  25. view.)
  26.  
  27. To insert a Design-Time Control in your document: 
  28.  
  29. * Choose Design Time Control... from the Insert menu.
  30.  
  31.  
  32. A dialog box that lists the Design-Time Controls registered
  33. on your system appears.
  34.  
  35. * Double-click on a control in the list, or select a
  36. control and click on [Insert].
  37.  
  38. A dialog box in which you can configure the applet,
  39. script, or Dynamic HTML script using the DTC will appear.
  40. The Properties dialog for the DTCs that ship with HoTMetaL
  41. PRO will automatically be launched when you insert them.
  42. For other DTCs, you may need to click on [Properties]
  43. when you insert the DTC to access the DTC's Properties
  44. dialog.
  45.  
  46. If a DTC has been inserted into your document, you can
  47. re-open the Properties dialog for the DTC at any time.
  48.  
  49. To re-open the DTC Properties dialog: 
  50.  
  51. *  Select the object or code inserted by the DTC and
  52. choose Design Time Control... from the Insert menu,
  53. or right-click inside the DTC and choose DTC Properties
  54. from the pop-up menu.
  55.  
  56. To delete the DTC and the code that it inserted:
  57.  
  58. * Right-click inside the object or code inserted by
  59. the DTC and choose Delete DTC from the pop-up menu.
  60.  
  61. You can also insert DTCs using the HoTMetaL FX chooser
  62. .
  63.  
  64. The DTCs described in the sections that follow were
  65. created by SoftQuad for use with the HoTMetaL PRO Editor.
  66. There are other DTCs that come with HoTMetaL PRO; please
  67. refer to the brief descriptions of the DTCs in the HoTMetaL
  68. FX Chooser for details on what they are used for.
  69.  
  70. 4.1. New Window Button
  71.  
  72. The functionality described in this topic is available
  73. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  74. that you are now using. Choose `How To Purchase' in
  75. the Help menu for ordering information.
  76.  
  77. The NewWndButton (new window button) DTC creates a JavaScript
  78. that is called by clicking a button. When the button
  79. is clicked in the browser a new browser window, displaying
  80. a specified page, will appear.
  81.  
  82. To configure the new window: 
  83.  
  84. * Turn on the desired New Window Features.
  85.  
  86. * Specify the width and height of the new window, in
  87. pixels.
  88.  
  89. Button Label specifies the text that will be displayed
  90. on the button. To specify the page that will be opened
  91. when the button is pressed: 
  92.  
  93. * Drag and drop a link to the Page to Open box or browse
  94. for a file by clicking on [Browse...]. 
  95.  
  96. 4.2. Shopping Cart
  97.  
  98. The functionality described in this topic is available
  99. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  100. that you are now using. Choose `How To Purchase' in
  101. the Help menu for ordering information.
  102.  
  103. Two DTCs configure the Shopping Cart. This is a quick
  104. and easy method of setting up a page from which users
  105. can `shop' on your system: they can select from products
  106. or services that you specify, and fill their own `shopping
  107. cart'. Users have control over their own shopping cart:
  108. they can delete items, add items, etc. When a user is
  109. finished loading up their cart, they can click on a
  110. button that activates a CGI script, which could, for
  111. example, send an acknowledgment to the user, and send
  112. the order to your order-processing department.
  113.  
  114. There are four steps involved in setting up a Shopping
  115. Cart:
  116.  
  117. * Use the  Shopping Cart DTC to create the Shopping
  118. Cart kiosk.
  119.  
  120. * Use the  Shopping Cart Form DTC one or more times
  121. to create a form for each product that you want to offer.
  122.  
  123. * Create a  CGI program to handle the data submitted
  124. by the Shopping cart form.
  125.  
  126. * Finally, you can run the shopping cart  to check whether
  127. you got the results you wanted.
  128.  
  129. 4.2.1. Creating the Shopping cart kiosk
  130.  
  131.  Choose the Shopping Cart DTC to create the kiosk. The
  132. kiosk is a frameset document consisting of two frames.
  133.  
  134.  The upper frame will contain the Shopping Cart console
  135. document, which is also created by the Shopping Cart
  136. DTC. The lower frame will contain one or more forms
  137. for individual products, which you create using the
  138. Shopping Cart Form DTC.
  139.  
  140. The console document consists of a JavaScript; when
  141. this page is displayed in the browser, it shows a list
  142. of all items selected. When a user selects an item from
  143. one of the product forms in the lower frame, this choice
  144. is added to a list in the console, and a running total
  145. of purchases is updated. The console also has buttons
  146. for clearing the list, deleting specific items, and
  147. for indicating that the user has finished selecting
  148. items.
  149.  
  150. The JavaScript in the console document also generates
  151. an HTML form that is displayed in the lower frame of
  152. the kiosk when the user clicks on the button indicating
  153. that they have finished selecting items. This form lists
  154. all of the user's selections, and the total cost. When
  155. the user submits this form, the form's data will be
  156. submitted to the CGI script that you specified.
  157.  
  158. * Enter the filename of the frameset page for the kiosk
  159. in the first text box. The DTC will create this page
  160. automatically. If you enter an existing filename, that
  161. file will be overwritten; for this reason, if you wish
  162. to create a customized kiosk page, you should do so
  163. after running this DTC.
  164.  
  165. * Enter the filename for the console page in the second
  166. text box. The DTC will create this page automatically.
  167.  
  168.  
  169. * Enter the filename of a page containing (or containing
  170. links to) forms for the individual products that you
  171. wish to offer in the third text box. These forms are
  172. generated using the Shopping Cart Form DTC. 
  173.  
  174. * Enter the URL of the CGI script that will be called
  175. when the user submits the Shopping Cart form. 
  176.  
  177. When you click on [OK], the DTC inserts a link in the
  178. current document, pointing to the kiosk (frameset) document.
  179. You can choose to keep this link to refer to the kiosk,
  180. or set up another link in another document. If you wish
  181. to run the DTC again to edit the values you entered
  182. above, you have to do so by clicking inside this link,
  183. and then choosing DTC Properties... from the pop-up
  184. menu, or Design Time Control... from the Insert menu.
  185.  
  186. 4.2.2. Creating the Shopping Cart forms
  187.  
  188. Use the Shopping Cart Form DTC to create forms for individual
  189. products that will be offered in the Shopping Cart kiosk.
  190. You have to run the DTC once for each form you wish
  191. to create; the form will be inserted into the current
  192. document, but you can copy it to a different document
  193. later. The forms must be in, or be in documents linked
  194. to, the `Shopping Cart Form' document that you specified
  195. in the Shopping Cart DTC. How you arrange the pages
  196. and forms is up to you; the important thing is that
  197. on each page, each form must have a unique name, as
  198. explained below. 
  199.  
  200. *  Each product's form must be given a unique name (one
  201. that is not used for another form in the same page).
  202. Enter the name for the current form in the Form Name
  203. text box. (This value becomes the value of the NAME
  204. attribute of the corresponding FORM element). 
  205.  
  206. * Enter the name of the product in the Product Name
  207. text box. 
  208.  
  209. * Enter price of the product in the Unit Price text
  210. box. This value must be a number without a currency
  211. symbol (such as `$').
  212.  
  213. * The text in the Order button label will appear on
  214. the button for this product in the order form.
  215.  
  216. * You can optionally enter some extra information about
  217. the product. Do not surround this text with quotes.
  218. This text not be displayed in the form but will be sent
  219. to the CGI script. 
  220.  
  221. 4.2.3. Setting up the CGI script
  222.  
  223. The back-end CGI script to do the shopping cart processing
  224. is not supplied with HoTMetaL PRO--there are many different
  225. types of Web servers, each of which need slightly different
  226. scripts configured in different ways. 
  227.  
  228. This script must process the data from the final order
  229. form. This data is in the standard format for form data--that
  230. is, as a sequence of name/value pairs, where the name
  231. and value are separated by `=', and the pairs are separated
  232. by `&'. For example:
  233.  
  234. name1=value1&name2=value2&name3=value3
  235.  
  236. The data is organized as follows: 
  237.  
  238. * For each product in the final order, two name/value
  239. pairs are submitted:
  240.  
  241. 1. The name in the first pair is the `product name'
  242. for that product, as entered in the Shopping Cart Form
  243. DTC.
  244.  
  245. 2. The value in the first pair is the quantity of that
  246. product that was ordered.
  247.  
  248. 3. The name in the second pair is the same as the name
  249. in the first pair, but with `.hidden' appended. For
  250. example, `redshoes.hidden'.
  251.  
  252. 4. The value in the second pair is the `extra information'
  253. for that product, as entered in the Shopping Cart Form
  254. DTC.
  255.  
  256. * The order in which the product data is submitted cannot
  257. be predicted ahead of time, since it depends on which
  258. products were chosen, and in which order.
  259.  
  260. * After the product data, a pair with name `total',
  261. and value equal to the total value of the order, is
  262. submitted.
  263.  
  264. Please see the links on CGI scripts on the `Technical
  265. Reference' page, accessible from the `Help' menu, for
  266. some places to go for more information on using and
  267. configuring CGI scripts. 
  268.  
  269. NOTE: Creating pages that can do online transactions
  270. with credit cards and security is beyond the scope of
  271. this manual. Please contact your Internet Service Provider
  272. for more information.
  273.  
  274. 4.2.4. Running the Shopping Cart
  275.  
  276. A user accesses the Shopping Cart by opening the kiosk
  277. document in a browser. Initially, the kiosk contains
  278. the console form in the top frame, and the order form
  279. in the lower frame.
  280.  
  281. * To select a product, enter the quantity in the order
  282. form and click on the corresponding button. The selection
  283. is added to the list in the console. 
  284.  
  285. * To delete a selection, select it in the console and
  286. click on [Delete Item].
  287.  
  288. * To delete all selections, click on [Clear All Items]
  289. in the console.
  290.  
  291. * If you wish to change the quantity of a product in
  292. your order, enter the new quantity in the order form
  293. and click on the button again. The new quantity replaces
  294. the previous selection. For example, if you initially
  295. selected two of something, and want to increase this
  296. to five, enter `5' and click on the button again.
  297.  
  298. * When you have finished selecting items, click on [End
  299. Shopping Trip]. This displays the final order form in
  300. the bottom frame.
  301.  
  302. * If you are happy with your order, click on [Accept]
  303. in the final order form. This send the form's data to
  304. the CGI script.
  305.  
  306. 4.3. Site Outliner
  307.  
  308. The functionality described in this topic is available
  309. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  310. that you are now using. Choose `How To Purchase' in
  311. the Help menu for ordering information.
  312.  
  313. Site Outliner is a dynamic HTML DTC, which is only supported
  314. by Microsoft Internet Explorer 4.0. This DTC will create
  315. an HTML file containing an outline of a Web site in
  316. a format similar to the way that Windows Explorer displays
  317. the contents of a folder. It uses SoftQuad's Web scanning
  318. technology to determine the format of the site and then
  319. produces dynamic HTML to create an outline. 
  320.  
  321. To configure the Site Outliner DTC:
  322.  
  323. * Enter the base URL from which the scan starts in the
  324. Site URL text box.
  325.  
  326. * Specify the icon image used for each page in the outline
  327. in the Page Icon Image text box.
  328.  
  329. * Specify the icon image used for each folder in the
  330. outline in the Folder Icon Image text box.
  331.  
  332. * Specify the file name of the page created to hold
  333. the generated HTML of the outline in the Page for Outline
  334. text box. 
  335.  
  336. Once the text boxes are filled in: 
  337.  
  338. * Select Start Scanning to do the scan. 
  339.  
  340. When the Scanning Status box displays Done scanning,
  341. click on [OK].
  342.  
  343. 4.4. Toggle button
  344.  
  345. The functionality described in this topic is available
  346. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  347. that you are now using. Choose `How To Purchase' in
  348. the Help menu for ordering information.
  349.  
  350. The Toggle button DTC creates a JavaScript that toggles
  351. between two images when you click on it. You can also
  352. link another JavaScript into this button so that it
  353. will be triggered on the mouse click.
  354.  
  355. To configure the Toggle Button DTC:
  356.  
  357. * Enter the path to the `on' and `off' images in the
  358. text boxes provided.
  359.  
  360. * Give this control a Button ID so that it can be invoked
  361. by JavaScript. 
  362.  
  363. * In the Java Script function name text box, you can
  364. enter the name of another JavaScript that is called
  365. when you click on the toggle button. 
  366.  
  367. The check box at the bottom of the dialog tells the
  368. DTC not to insert another copy of the the Toggle Button
  369. script if you already have a toggle button script in
  370. your page.
  371.  
  372. 4.5. Web Tour
  373.  
  374. The functionality described in this topic is available
  375. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  376. that you are now using. Choose `How To Purchase' in
  377. the Help menu for ordering information.
  378.  
  379. With the Web Tour DTC, you can create an automated tour--a
  380. kind of Web page slide show--for any collection of files
  381. that can be displayed in a Web browser (HTML, GIF, JPEG,
  382. etc.). You need to specify a kiosk page; that is, the
  383. page that hosts the Web tour and defines its format.
  384.  
  385.  
  386. To configure the Web Tour DTC:
  387.  
  388. * Enter or browse for the page where the tour script
  389. will be inserted, in the Tour Control Page text box.
  390.  
  391. * Select the format for the tour in the Tour Kiosk Format
  392. section of the dialog. The tour can be formatted in
  393. one of two ways: 
  394.  
  395. 1. A frame set, with the controls in one frame and the
  396. pages in another.
  397.  
  398. 2. A floating window with controls, and the tour pages
  399. and images appearing in the main window.
  400.  
  401. * Select the appropriate radio button and enter the
  402. file name for the kiosk page. 
  403.  
  404. * Add URLs to the Pages for the tour list. 
  405.  
  406. * Click on [Add] and [Remove] to specify which pages
  407. are in the tour by editing the Pages for the tour list.
  408.  
  409.  When you click on the [Edit] button, a dialog for entering
  410. information specific to that page appears. You can specify
  411. a delay time--the amount of time the page will be displayed,
  412. in seconds (the default is 10)--and a caption.
  413.  
  414.